/*
 * Copyright (C) 2024, Ingenic Semiconductor Co.,Ltd.
 * Author: Keven <keven.ywhan@ingenic.com>
 */

#ifndef __COMMON_H__
#define __COMMON_H__

#include <base.h>
#include <encoding.h>
#include <cpm.h>
#include <uart.h>
#include <time.h>
#include <config.h>

#define readb(addr)        (*(volatile unsigned char *)(addr))
#define readw(addr)        (*(volatile unsigned short *)(addr))
#define readl(addr)        (*(volatile unsigned int *)(addr))
#define writeb(b, addr)    (*(volatile unsigned char *)(addr)) = (b)
#define writew(b, addr)    (*(volatile unsigned short *)(addr)) = (b)
#define writel(b, addr)    (*(volatile unsigned int *)(addr)) = (b)

#endif /* __COMMON_H__ */
